
<?php

$folderName = $_POST['folderName'];

//current menu
$menuClassLife = ""; //人生
$menuClassValues = ""; //价值观
$menuClassBelief = ""; //信念
$menuClassThinking = ""; //思维习惯
$menuClassMind = ""; //心境
$menuClassNature = ""; //性格
$menuClassHeart = ""; //信心
$menuClassHealth = ""; //健康
$menuClassGoal = ""; //目标
$menuClassDecision = ""; //决心
$menuClassAction = ""; //行动
$menuClassHappy = ""; //痛苦与快乐


//current show
$showDiv = "";

if($folderName == "life"){
	$menuClassLife = "current";
	$showDiv = "life";
}else if($folderName == "values"){
	$menuClassValues = "current";
	$showDiv = "values";
}else if($folderName == "belief"){
	$menuClassBelief = "current";
	$showDiv = "belief";
}else if($folderName == "thinking"){
	$menuClassThinking = "current";
	$showDiv = "thinking";
}else if($folderName == "mind"){
	$menuClassMind = "current";
	$showDiv = "mind";
}else if($folderName == "nature"){
	$menuClassNature = "current";
	$showDiv = "nature";
}else if($folderName == "heart"){
	$menuClassHeart = "current";
	$showDiv = "heart";
}else if($folderName == "health"){
	$menuClassHealth = "current";
	$showDiv = "health";
}else if($folderName == "goal"){
	$menuClassGoal = "current";
	$showDiv = "goal";
}else if($folderName == "decision"){
	$menuClassDecision = "current";
	$showDiv = "decision";
}else if($folderName == "action"){
	$menuClassAction = "current";
	$showDiv = "action";
}else if($folderName == "happy"){
	$menuClassHappy = "current";
	$showDiv = "happy";
}else{//default
	$menuClassLife = "current";
	$showDiv = "life";
}



?>



<form name="menuForm" action="/index.php" method="post">

<div id="leftmenu">

 <div id="firstpane" class="menu_list">
    <!--------------------------------------------------------------------->
    <p class="menu_head <?php echo $menuClassLife; ?>">人生</p>
    <div style="display:block" class='menu_body' id="life">
      <a href="javascript:goto('life','idealLife.php')">理想的人生</a>
	  <a href="javascript:goto('life','baseDream.php')">最大的梦想</a>
	  <a href="javascript:goto('life','whoami.php')">自我认定</a>
	  <a href="javascript:goto('life','howtochange.php')">人生命运</a>
	  <a href="javascript:goto('life','makedecision.php')">决定因素</a>
	  <a href="javascript:goto('life','potential.php')">潜能激发</a>
	  <a href="javascript:goto('life','success.php')">必定成功</a>
    </div>

	<!--------------------------------------------------------------------->
    <p class="menu_head <?php echo $menuClassValues; ?>">价值观</p>
    <div style="display:none" class=menu_body id="values">
      <a href="javascript:goto('values','valueswhat.php')">什么是价值观</a>	  
	  <a href="javascript:goto('values','valuespower.php')">价值观的影响力</a>
	  <a href="javascript:goto('values','valuesfrom.php')">价值观是如何形成的</a>
	  <a href="javascript:goto('values','valuesyour.php')">你的价值观是什么</a>
	  <a href="javascript:goto('values','valueschange.php')">如何调整价值观</a>
    </div>

	<!--------------------------------------------------------------------->
    <p class="menu_head" <?php echo $menuClassBelief; ?>>信念</p>
    <div style="display:none" class=menu_body id="belief">
      <a href="javascript:goto('belief','beliefwhat.php')">什么是信念</a>
	  <a href="javascript:goto('belief','beliefpower.php')">信念的影响力</a>
	  <a href="javascript:goto('belief','belieffrom.php')">信念是如何形成的</a>
	  <a href="javascript:goto('belief','beliefrule.php')">心则</a>
	  <a href="javascript:goto('belief','beliefexperience.php')">心范</a>
    </div>

	<!--------------------------------------------------------------------->
    <p class="menu_head" <?php echo $menuClassThinking; ?>>思维习惯</p>
    <div style="display:none" class=menu_body id="thinking">
      <a href="javascript:goto('thinking','thinkingask.php')">提问方式</a>
	  <a href="javascript:goto('thinking','thinkingword.php')">习惯用字眼</a>
	  <a href="javascript:goto('thinking','thinkingallusion.php')">引喻</a>
    </div>

	<!--------------------------------------------------------------------->
    <p class="menu_head" <?php echo $menuClassMind; ?>>心境</p>
    <div style="display:none" class=menu_body id="mind" >
      <a href="javascript:goto('mind','mind.php')">心境</a>
	  <a href="javascript:goto('mind','mindfocus.php')">意焦</a>
    </div>

	<!--------------------------------------------------------------------->
    <p class="menu_head" <?php echo $menuClassNature; ?>>性格</p>
    <div style="display:none" class=menu_body id="nature">
      <a href="javascript:goto('nature','nature.php')">性格</a>
    </div>

	<!--------------------------------------------------------------------->
	<p class="menu_head" <?php echo $menuClassHeart; ?>>信心</p>
    <div style="display:none" class=menu_body id="heart" >
      <a href="javascript:goto('heart','heart.php')">信心</a>
    </div>

	<!--------------------------------------------------------------------->
	<p class="menu_head" <?php echo $menuClassHealth; ?>>健康</p>
    <div style="display:none" class=menu_body id="health">
      <a href="javascript:goto('health','health.php')">健康</a>
    </div>
	
	<!--------------------------------------------------------------------->
	<p class="menu_head" <?php echo $menuClassGoal; ?> >目标</p>
    <div style="display:none" class=menu_body id="goal" >
      <a href="javascript:goto('goal','goal.php')">目标</a>
    </div>

	<!--------------------------------------------------------------------->
	<p class="menu_head" <?php echo $menuClassDecision; ?> >决心决定</p>
    <div style="display:none" class=menu_body id="decision">
      <a href="javascript:goto('decision','decision.php')">决心</a>
    </div>

	<!--------------------------------------------------------------------->
	<p class="menu_head" <?php echo $menuClassAction; ?>>行动</p>
    <div style="display:none" class=menu_body id="action">
      <a href="javascript:goto('action','action.php')">行动</a>
    </div>

	<!--------------------------------------------------------------------->
    <p class="menu_head <?php echo $menuClassHappy; ?>">痛苦与快乐</p>
    <div style="display:none" class=menu_body id="happy">
      <a href="javascript:goto('happy','happyandpain.php')">痛苦与快乐</a>	  
    </div>

</div>

<input type="hidden" name="folderName" id="folderName" >
<input type="hidden" name="fileName" id="fileName" >


<script type=text/javascript>
$(document).ready(function(){
	//$("#firstpane .menu_body:eq(0)").show();
	$("#life").hide();
	//$("#values").show();
	$("#<?php echo $showDiv; ?>").show();

	$("#firstpane p.menu_head").click(function(){
		$(this).addClass("current").next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
		$(this).siblings().removeClass("current");
	});
	$("#secondpane .menu_body:eq(0)").show();
	$("#secondpane p.menu_head").mouseover(function(){
		$(this).addClass("current").next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow");
		$(this).siblings().removeClass("current");
	});
	
});


function goto(folderName, fileName){
	document.getElementById('folderName').value = folderName;
	document.getElementById('fileName').value = fileName;
	document.menuForm.submit();
}
</script>
</div>
</form>

